package jk.fox.common.payload.message;

import jk.fox.exchange.client.ClientExchange;
import jk.fox.exchange.server.ServerExchange;
import jk.fox.transport.ClientTransporter;
import jk.fox.transport.ServerTransporter;

/**
 * Exchange、Transport 交互分发器
 * @author cuichao
 * @Description: MessageDispatcher
 * @Date: create in 2020/5/15 20:29
 */
public interface MessageDispatcher {
     /**
      * transport与exchange消息分发器
      * @param message
      * @return
      */
     Message dispatch(Message message);

     /**
      * clientExchange
      * @param exchange
      */
     void clientExchange(ClientExchange exchange);
     /**
      * clientTransporter
      * @param transporter
      */
     void clientTransporter(ClientTransporter transporter);

     /**
      * serverExchange
      * @param exchange
      */
     void serverExchange(ServerExchange exchange);

     /**
      * serverTransporter
      * @param transporter
      */
     void serverTransporter(ServerTransporter transporter);

}
